from openpyxl import load_workbook

class A3mall():
    def __init__(self,path,sheetname):
        self.path=load_workbook(path)
        self.sheetname=self.path[sheetname]

    def getDAta(self):
        datalist=[]
        for line in self.sheetname:
            list=[]
            list.append(line[0].value)
            list.append(line[1].value)
            datalist.append(list)
        datalist.pop(0)
        return datalist

if __name__ == '__main__':
    path=r'C:\Users\HP\Desktop\login.xlsx'
    sheetname="Sheet1"
    dy=A3mall(path,sheetname)
    print(dy.getDAta())


